import { ErrorCode } from '@/server/common/error-code.enum';

export class AppError extends Error {
    /** @type {ErrorCode} */
    errorCode;

    constructor(errorCode) {
        super(errorCode);
        this.errorCode = errorCode;
        Error.captureStackTrace(this, this.constructor);
    }
}
